#import "dfhgwhruebvhrheysternideology.h"
#import "dfhgwhruebvhrheyluggagerecorder.h"
#import "dfhgwhruebvhrheyoutwarddelegate.h"
#import "dfhgwhruebvhrheysignaltragedyViewController.h"
#import <FirebaseAnalytics/FirebaseAnalytics.h>
@interface dfhgwhruebvhrheysignaltragedyViewController ()
@property (nonatomic, strong) UITextField *passwdInput;
@end
@implementation dfhgwhruebvhrheysignaltragedyViewController  {
	UILabel *confirmText;
	UILabel *tipsText;
	UILabel *passwdText;
	UIButton *eyeBtn;
	UIView *line;
	UIButton *confirmBtn;
}
- (void)viewDidLoad {
    [super viewDidLoad];
	[self loadUI];
}
- (void)viewDidAppear:(BOOL)animated {
	[super viewDidAppear:animated];
	[self.passwdInput becomeFirstResponder];
}
- (void)loadUI {
}
- (void)inputChange:(NSNotification *)not {
	UITextField *input = [not object];
	NSString *text = input.text;
	if(text.length >= 6) {
		self.passwdInput.text = [text substringToIndex:6];
		[self.view endEditing:YES];
	}
}
- (void)login:(NSString *)mobile withPasswd:(NSString *)passwd {
	NSString *riskJson = [dfhgwhruebvhrheyoptionsaving getRiskJsonData];
	NSMutableDictionary *params = [@{} mutableCopy];
	params[@"device_id"] = [[dfhgwhruebvhrheyoptionsaving uuid] dhgfywegwygeydwscholarshiptexture];
	params[@"mobile"] = mobile;
	params[@"pgid"] = @"1";
	params[@"password"] = passwd;
	params[@"type"] =  @"2";
	params[@"version"] = [dfhgwhruebvhrheyoptionsaving appVersionString];
	params[@"mobile"] = mobile;
	params[@"rdata"] = riskJson;
	__weak typeof(self) weakSelf = self;
	[[dfhgwhruebvhrheyluggagerecorder shareInstance] dhgfywegwygeydwbarrierawait:dhgfywegwygeydwawaitlamb path:loginApi isEncrypt:YES withParams:params success:^(NSURLSessionDataTask * _Nonnull task, NSString * _Nonnull json) {
		[dfhgwhruebvhrheyoptionsaving.keyWindow stopLoading];
		__strong typeof(weakSelf) strongSelf = weakSelf;
		dfhgwhruebvhrheyoutwarddelegate *model = [dfhgwhruebvhrheyoutwarddelegate yy_modelWithJSON:json];
		if (model.code == 200) {
			[dfhgwhruebvhrheyoptionsaving saveUserInfo:json completion:^{
				[dfhgwhruebvhrheyoptionsaving uploadRiskDataByCatchId:@"4" andApplyId:nil withDetailId:nil];
				[strongSelf dismissViewControllerAnimated:YES completion:nil];
				[[NSNotificationCenter defaultCenter] postNotificationName:dhgfywegwygeydwembarrassurgent object:nil];
			}];
		}else {
			[dfhgwhruebvhrheyoptionsaving.keyWindow show:model.error];
		}
	} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
		[dfhgwhruebvhrheyoptionsaving.keyWindow stopLoading];
	}];
}
- (void)confirmBtnActions:(UIButton *)sender {
}
- (void)viewDidLayoutSubviews {
	[super viewDidLayoutSubviews];
}
@end
